﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<fmt:setBundle basename="ApplicationMessage" />

<div class="modal-dialog" role="document" style="width: 1200px;">
  <div class="modal-content">
    <div class="modal-header">
      <button type="button" class="close" data-dismiss="modal" aria-label="Close">
        <span aria-hidden="true">&times;</span>
      </button>
      <h4 class="modal-title"><fmt:message key="assessor.64" /> <fmt:message key="assessor.380" /></h4>
    </div>
    <form class="form-horizontal ms-form" role="form" action="${ctx.host}/sessions/${session.id}/supervisor-calibrations/${sessionCalibration.id}/edit-readiness-recommendation" data-validate="true" method="POST" style="margin-top: 30px;" data-validate="true">
      <div class="modal-body">
        <input type="hidden" name="_method" value="PATCH">
        <input type="hidden" name="language" value="${language}">
        <div class="readiness-wrap" style="padding: 0 15px;">
          <div class="form-group" style="margin-bottom: 0px; font-size: 16px; color: #737072;">
            <%-- <div class="col-xs-2"><fmt:message key="assessor.432" /></div> --%>
            <div class="col-xs-4"><fmt:message key="assessor.431" /></div>
            <div class="col-xs-8"><fmt:message key="assessor.433" /></div>
          </div>
          <div class="form-group">
            <%-- <div class="col-xs-2">
              <h6 class="readiness-title"><fmt:message key="assessor.434" /></h6>
            </div> --%>
            <div class="col-xs-4">
              <h6 class="readiness-title"><fmt:message key="assessor.435" /></h6>
            </div>
            <div class="col-xs-8">
              <h6 class="readiness-title"><fmt:message key="assessor.436" /></h6>
            </div>
          </div>
          <div class="clearfix">
            <div class="col-xs-4">
              <c:set var="recommendation" value="${empty sessionReportWriting ? sessionCalibrationRecommendation : sessionReportWriting.sessionReportRecommendation}"/>
              <div class="form-group readiness-gruop active">
                <%-- <div class="col-xs-4" data-toggle="popover" data-trigger="focus" data-placement="right" title="tips" data-content="<fmt:message key="assessor.479" />">
                  <label>
                    <input type="checkbox" name="simpleHotel" value="true" ${recommendation.simpleHotel ? 'checked' : ''} disabled><fmt:message key="assessor.440" />
                  </label>
                </div> --%>
                <div class="col-xs-8 hotel-item">
                  <select name="simpleHotelResult" class="form-control select2" disabled>
                    <option value=""></option>
                    <option value="READY_NOW" ${not empty recommendation.simpleHotelResult ? recommendation.simpleHotelResult.readyNow ? 'selected' : '' : ''}><fmt:message key="assessor.437" /></option>
                    <option value="SIX_MONTH" ${not empty recommendation.simpleHotelResult ? recommendation.simpleHotelResult.sixMonth ? 'selected' : '' : ''}><fmt:message key="assessor.441" /></option>
                    <option value="TWELVE_MONTH" ${not empty recommendation.simpleHotelResult ? recommendation.simpleHotelResult.twelveMonth ? 'selected' : '' : ''}><fmt:message key="assessor.442" /></option>
                    <option value="EIGHTEEN_MONTH" ${not empty recommendation.simpleHotelResult ? recommendation.simpleHotelResult.eighteenMonth ? 'selected' : '' : ''}><fmt:message key="assessor.443" /></option>
                    <option value="NOT_READY" ${not empty recommendation.simpleHotelResult ? recommendation.simpleHotelResult.notReady ? 'selected' : '' : ''}><fmt:message key="assessor.444" /></option>
                  </select>
                </div>
                <%-- <div class="col-xs-6 comments-item">
                  <textarea style="width: 100%;" name="recommendations[0].comment" ${justView ? 'disabled' : ''}>${not empty recommendations['ready-now'] ? recommendations['ready-now'].comment : ''}</textarea>
                </div> --%>
              </div>
              <%-- <div class="form-group readiness-gruop ${recommendation.averageHotel ? 'active' : ''}">
                <div class="col-xs-4" data-toggle="popover" data-trigger="focus" data-placement="right" title="tips" data-content="<fmt:message key="assessor.479" />">
                  <label><input type="checkbox" name="averageHotel" value="true" ${recommendation.averageHotel ? 'checked' : ''} disabled> <fmt:message key="assessor.439" /></label>
                </div>
                <div class="col-xs-8 hotel-item">
                  <select name="averageHotelResult" class="form-control select2" disabled>
                    <option value=""></option>
                    <option value="READY_NOW" ${not empty recommendation.averageHotelResult ? recommendation.averageHotelResult.readyNow ? 'selected' : '' : ''}><fmt:message key="assessor.437" /></option>
                    <option value="SIX_MONTH" ${not empty recommendation.averageHotelResult ? recommendation.averageHotelResult.sixMonth ? 'selected' : '' : ''}><fmt:message key="assessor.441" /></option>
                    <option value="TWELVE_MONTH" ${not empty recommendation.averageHotelResult ? recommendation.averageHotelResult.twelveMonth ? 'selected' : '' : ''}><fmt:message key="assessor.442" /></option>
                    <option value="EIGHTEEN_MONTH" ${not empty recommendation.averageHotelResult ? recommendation.averageHotelResult.eighteenMonth ? 'selected' : '' : ''}><fmt:message key="assessor.443" /></option>
                    <option value="NOT_READY" ${not empty recommendation.averageHotelResult ? recommendation.averageHotelResult.notReady ? 'selected' : '' : ''}><fmt:message key="assessor.444" /></option>
                  </select>
                </div>
                <div class="col-xs-6 comments-item">
                  <textarea style="width: 100%;" name="recommendations[1].comment" ${justView ? 'disabled' : ''}>${not empty recommendations['six-month'] ? recommendations['six-month'].comment : ''}</textarea>
                </div>
              </div>
              <div class="form-group readiness-gruop ${recommendation.complexHotel ? 'active' : ''}">
                <div class="col-xs-4" data-toggle="popover" data-trigger="focus" data-placement="right" title="tips" data-content="<fmt:message key="assessor.479" />">
                  <label><input type="checkbox" name="complexHotel" value="true" ${recommendation.complexHotel ? 'checked' : ''} disabled> <fmt:message key="assessor.438" /></label>
                </div>
                <div class="col-xs-8 hotel-item">
                  <select name="complexHotelResult" class="form-control select2" disabled>
                    <option value=""></option>
                    <option value="READY_NOW" ${not empty recommendation.complexHotelResult ? recommendation.complexHotelResult.readyNow ? 'selected' : '' : ''}><fmt:message key="assessor.437" /></option>
                    <option value="SIX_MONTH" ${not empty recommendation.complexHotelResult ? recommendation.complexHotelResult.sixMonth ? 'selected' : '' : ''}><fmt:message key="assessor.441" /></option>
                    <option value="TWELVE_MONTH" ${not empty recommendation.complexHotelResult ? recommendation.complexHotelResult.twelveMonth ? 'selected' : '' : ''}><fmt:message key="assessor.442" /></option>
                    <option value="EIGHTEEN_MONTH" ${not empty recommendation.complexHotelResult ? recommendation.complexHotelResult.eighteenMonth ? 'selected' : '' : ''}><fmt:message key="assessor.443" /></option>
                    <option value="NOT_READY" ${not empty recommendation.complexHotelResult ? recommendation.complexHotelResult.notReady ? 'selected' : '' : ''}><fmt:message key="assessor.444" /></option>
                  </select>
                </div>
                <div class="col-xs-6 comments-item">
                  <textarea style="width: 100%;" name="recommendations[2].comment" ${justView ? 'disabled' : ''}>${not empty recommendations['twelve-month'] ? recommendations['twelve-month'].comment : ''}</textarea>
                </div>
              </div> --%>
            </div>
            <div class="col-xs-6">
              <textarea style="width: 100%;" rows="5" name="commentCn" placeholder="<fmt:message key="assessor.483" />" data-validate="required">${empty sessionReportWriting ? recommendation.comment : recommendation.commentCn}</textarea>
              <%-- <textarea style="width: 100%;${language=='cn' ? '' : 'display:none;'}" rows="5" name="commentCn" placeholder="<fmt:message key="assessor.483" />" data-validate="required">${empty sessionReportWriting ? recommendation.comment : recommendation.commentCn}</textarea>
              <textarea style="width: 100%;${language=='en' ? '' : 'display:none;'}" rows="5" name="commentEn" placeholder="<fmt:message key="assessor.484" />" data-validate="required">${empty sessionReportWriting ? recommendation.comment : recommendation.commentEn}</textarea> --%>
            </div>
          </div>
        </div>
      </div>

      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal"><fmt:message key="assessor.460" /></button>
        <button type="submit" class="btn btn-success" style="background: #70AD47;"><fmt:message key="assessor.462" /></button>
      </div>
    </form>
  </div>
</div>

<div class="modal fade validate-modal" tabindex="-1" role="dialog">
  <div class="modal-dialog" role="document" style="position: absolute; top: 50%; left: 50%; margin-top: -150px; margin-left:-250px; width: 500px; height: 200px;">
    <div class="modal-content">
      <div class="modal-body" style="height: 150px;">
        <p style="font-size: 18px; text-align: center; line-height: 125px; color: #c00000;">选中的值不能为空</p>
      </div>
    </div>
  </div>
</div>

<script type="text/javascript">
  $('select.select2').select2({
    theme : "classic",
    placeholder : "please choose",
    minimumResultsForSearch : -1,
    allowClear : true,
  })
</script>